﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    public class Page
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public string Tag { get; set; }
        public string Detail { get; set; }
        public string Level { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Keyword { get; set; }
        public string Type { get; set; }
        public string Link { get; set; }
        public string Target { get; set; }
        public string Position { get; set; }
        public string Ord { get; set; }
        public string Active { get; set; }
        public string Lang { get; set; }

        public Page PageIDataReader(IDataReader dr)
        {
            return  new Page
                        {
                            Id = Convert.ToString(dr["Id"]),
                            Name = Convert.ToString(dr["Name"]),
                            Tag = Convert.ToString(dr["Tag"]),
                            Detail = Convert.ToString(dr["Detail"]),
                            Level = Convert.ToString(dr["Level"]),
                            Title =  Convert.ToString(dr["Title"]),
                            Description = Convert.ToString(dr["Description"]),
                            Keyword = Convert.ToString(dr["Keyword"]),
                            Type = Convert.ToString(dr["Type"]),
                            Link = Convert.ToString(dr["Link"]),
                            Target = Convert.ToString(dr["Target"]),
                            Position = Convert.ToString(dr["Position"]),
                            Ord = Convert.ToString(dr["Ord"]),
                            Active = Convert.ToString(dr["Active"]),
                            Lang = Convert.ToString(dr["Lang"]),                            
                        };
            
      
        }
    }
}
